﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;

namespace RISMOTAXDP.EmailService.MailProcess
{
    public interface IMailProcess : IDisposable
    {
        /// <summary>
        /// 设置本次执行的数据库连接对象
        /// </summary>
        /// <param name="conn">数据库连接</param>
        bool SetParameters(System.Data.SqlClient.SqlConnection conn);
        /// <summary>
        /// 获取待生成的邮件记录数
        /// </summary>
        /// <returns>返回待生成邮件记录数</returns>
        int CheckData();
        /// <summary>
        /// 执行指定邮件的生成处理
        /// </summary>
        /// <param name="index">索引号（从0开始）</param>
        /// <returns>返回执行结果</returns>
        bool Process(int index);
        /// <summary>
        /// 返回邮件业务类型代码
        /// </summary>
        /// <returns></returns>
        string GetMailOPCode();
    }
}
